/* 
 * 
 * Created on 21 Oct 2011 by simonk
 * 
 * Copyright: Multicom Products Ltd. 2011 Bristol, England
 */
package objects.shared;

import com.google.gson.Gson;

import objects.ObjectCodes;

/**
 *
 * @author simonk
 */
public class WorkPacket implements ObjectCodes {
	public String uniqueId;
	public String status;
	public String timestamp;
	public String jobname;
	public String sourceDir;
	public String resultDir;
	public String executable;
	public String args;
	public String walltime;
	public String pbsString;
	public int cluster;
	public int nodes;
	public int ppn;
	public int opt;
	public int optRange;
	public int replay;
	public boolean sendResultsBack;
	public boolean unzipResults;
	
	public WorkPacket() {	
		
	}
	
	public String toString()
	{
		return CLI_WORK_PKT +"|"+ new Gson().toJson(this);
	}
	
	public static WorkPacket fromJSon(String json)
	{
		return new Gson().fromJson(json,WorkPacket.class);
	}
}
